# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.

defmodule GoogleApi.Partners.V2.Model.RequestMetadata do
  @moduledoc """
  Common data that is in each API request.

  ## Attributes

  - experimentIds ([String.t]): Experiment IDs the current request belongs to. Defaults to: `null`.
  - locale (String.t): Locale to use for the current request. Defaults to: `null`.
  - partnersSessionId (String.t): Google Partners session ID. Defaults to: `null`.
  - trafficSource (TrafficSource): Source of traffic for the current request. Defaults to: `null`.
  - userOverrides (UserOverrides): Values to use instead of the user&#39;s respective defaults for the current request. These are only honored by whitelisted products. Defaults to: `null`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :experimentIds => list(any()),
          :locale => any(),
          :partnersSessionId => any(),
          :trafficSource => GoogleApi.Partners.V2.Model.TrafficSource.t(),
          :userOverrides => GoogleApi.Partners.V2.Model.UserOverrides.t()
        }

  field(:experimentIds, type: :list)
  field(:locale)
  field(:partnersSessionId)
  field(:trafficSource, as: GoogleApi.Partners.V2.Model.TrafficSource)
  field(:userOverrides, as: GoogleApi.Partners.V2.Model.UserOverrides)
end

defimpl Poison.Decoder, for: GoogleApi.Partners.V2.Model.RequestMetadata do
  def decode(value, options) do
    GoogleApi.Partners.V2.Model.RequestMetadata.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Partners.V2.Model.RequestMetadata do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
